<template>
  <div>
    <nav-bar class="nav-bar"
      ><template v-slot:center><div>SuperMall商城</div></template></nav-bar
    >
    <!--1.单独封装一个组件: 利用slot知识点-->
    <UserInfo></UserInfo>

    <!--2.没有单独封装: 不同的地方太多, 需要传过多的参数-->
    <section class="account">
      <div class="account-item">
        <div class="number"><span class="balance">0.00</span>元</div>
        <div class="account-info">我的余额</div>
      </div>
      <div class="account-item">
        <div class="number"><span class="balance">0</span>个</div>
        <div class="account-info">我的优惠</div>
      </div>
      <div class="account-item">
        <div class="number"><span class="balance">0</span>分</div>
        <div class="account-info">我的积分</div>
      </div>
    </section>

    <!-- 3 -->
    <section class="three">
      <div><span class="iconfont">&#xe641;</span>我的消息</div>
      <div><span class="iconfont">&#xe60b;</span>积分商城</div>
      <div><span class="iconfont">&#xe600;</span>会员卡</div>
    </section>
    <!-- 4 -->
    <section class="four">
      <div><span class="iconfont">&#xe636;</span>我的购物车</div>
      <div><span class="iconfont">&#xe610; </span>下载购物APP</div>
    </section>
  </div>
</template>

<script>
import UserInfo from "./profilechild/UserInfo";
import NavBar from "components/commen/navbar/NavBar";
export default {
  name: "Profile",
  components: {
    UserInfo,
    NavBar,
  },
};
</script>

<style scoped>
/* #profile {
  background-color: #f2f2f2;
} */
.nav-bar {
  background-color: var(--color-tint);
  font-weight: 700;
  color: #fff;
}

.account {
  display: flex;
}
.account-item {
  width: 100%;
  background-color: #fff;
  margin-right: 1px;
  text-align: center;
}
.account-item:last-of-type {
  margin-right: 0;
}
.account-item {
  color: #666;
  font-size: 13px;
  padding: 18px;
}
.account-item .balance {
  font-size: 24px;
  font-weight: 700;
  color: #ff5f3e;
}
.account-info {
  margin-top: 6px;
}
.order-list,
.service-list {
  margin-top: 12px;
}
.three,
.four {
  border-top: 20px solid #f2f2f2;
}
.three div,
.four div {
  padding: 10px 0 5px 10px;
}
.three div span,
.four div span {
  margin-right: 10px;
}
</style>